feat: introduce renderer plugin architecture and renderer packages#511
Open
feat: introduce renderer plugin architecture and renderer packages#511
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
This PR upgrades Graphic Walker rendering from a single built-in implementation to a plugin-based architecture, and introduces
Observable PlotandEChartsas standalone renderer packages. The goals are to support extensible renderers, reduce coupling in the core package, and preserve compatibility with legacy renderer IDs.What’s included
1) Renderer Plugin architecture (core)
@kanaries/graphic-walker:registerRendererPluginunregisterRendererPlugingetRendererPluginlistRendererPluginsregisterRendererAliasresolveRendererIdbuiltin:vegaplugin and auto-registration during package initialization.vega-lite -> builtin:vega.2) Standalone renderer packages
@kanaries/graphic-walker-renderer-observable-plot.@kanaries/graphic-walker-renderer-echarts.GraphicRendererorGraphicWalkerviacreateXxxPlugin().3) Plugin injection and fallback in rendering entry points
GraphicRenderer / SpecRenderer / PureRenderernow acceptrendererPlugins.layout.renderer; if a plugin is missing or failscanRender, it falls back tobuiltin:vega.4) Documentation updates
Renderer Pluginssection in README with examples for:registerRendererPlugin(createObservablePlotPlugin())registerRendererPlugin(createEChartsPlugin())5) Engineering and release support
.github/workflows/release-renderer-plugin.yml.Compatibility
renderer: "vega-lite"continue to work.builtin:vegainstead of failing.Validation
/examples/GraphicRendererEChartsorObservable Plotand verified rendering works.